/*
 * Generic FIFO component, implemented as a circular buffer.
 *
 * Copyright (c) 2024 yanl1229
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, see <http://www.gnu.org/licenses/>.
 */
#include "stm32f4xx.h"
#include <stdio.h>


#include "FreeRTOS.h"
#include "task.h"
#include "system.h"

static void task1(void *args __attribute((unused)))
{

	for (;;) {
		printf("task1 runing\n");
		vTaskDelay(pdMS_TO_TICKS(250));
	}
}

static void task2(void *args __attribute((unused)))
{

	for (;;) {
		printf("task1 runing\n");
		vTaskDelay(pdMS_TO_TICKS(1000));
	}
}


int main(void)
{

	system_init();
	printf("main runing\n");

	xTaskCreate(task1, "task1", 100, NULL, configMAX_PRIORITIES-1, NULL);
	xTaskCreate(task2, "task2", 100, NULL, configMAX_PRIORITIES-2, NULL);
	vTaskStartScheduler();

    while (1)
    {
    }
}
